﻿namespace Elsa.ApprovalFlow.Entities;

public class LeaveRequest
{
    public string Id { get; set; } = Guid.NewGuid().ToString("N");
    public string ApplicantId { get; set; } // 申请人ID
    public string ApproverId { get; set; } // 审批人ID
    public string WorkflowInstanceId { get; set; } // 工作流实例ID
    public DateTime StartDate { get; set; } // 开始日期
    public DateTime EndDate { get; set; } // 结束日期
    public int TotalDays => (int)(EndDate - StartDate).TotalDays; // 总天数
    public string Reason { get; set; } // 请假原因
    public string Status { get; set; } = "Pending"; // 状态: Pending, Approved, Rejected
    public string Comments { get; set; } // 审批意见
    public string CurrentApprovalRole { get; set; } // 当前审批角色
}
